package com.hex.ds.hdrs.period.task.controller;

import com.hex.ds.hdrs.period.task.dto.PeriodTaskStreamDto;
import com.hex.ds.hdrs.period.task.service.PeriodTaskStreamService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Package: com.hex.ds.hdrs.period.task.controller
 * @ClassName PeriodTaskStreamController
 * @Description: 周期任务流水控制器
 * @Author: ji.tang
 * @Date 2022/6/20 10:28
 * @Version v1.0
 **/
@Slf4j
@RestController
@RequestMapping("/api/periodTaskStream")
public class PeriodTaskStreamController {

    @Autowired
    private PeriodTaskStreamService periodTaskStreamService;


    /**
     * @Method: selectPage
     * @Param: [periodTaskStreamDto, page]
     * @Return: org.springframework.http.ResponseEntity<java.lang.Object>
     * @Description: 周期任务实例流水数据分页查询
     * @Author: ji.tang
     * @Date: 2022/6/20 11:02
     * @Version: V1.0
     */
    @GetMapping("/selectList")
    @ApiOperation("查询集合")
    public ResponseEntity<Object> selectList(PeriodTaskStreamDto periodTaskStreamDto) {
        log.info("【PeriodTaskStreamController.selectPage】periodTaskStreamDto:  {}", periodTaskStreamDto);
        return new ResponseEntity<>(this.periodTaskStreamService.selectList(periodTaskStreamDto), HttpStatus.OK);
    }

}
